# Link commands:
all: main test_waypoints test_robots test_ball

main: main.cpp robot.o movingobject.o waypoint.o
	g++ main.cpp robot.o movingobject.o waypoint.o -o main -lpthread

test_robots: waypoint.o movingobject.o robot.o
	g++ waypoint.o movingobject.o robot.o test_robots.cpp -o test_robots
	
test_ball: waypoint.o movingobject.o ball.o
	g++ waypoint.o movingobject.o ball.o test_ball.cpp -o test_ball

test_waypoints: waypoint.o
	g++ test_waypoints.cpp waypoint.o -o test_waypoints

# compilation commands:
waypoint.o: waypoint.cpp waypoint.h
	g++ -Wall -c waypoint.cpp -o waypoint.o

movingobject.o: movingobject.cpp movingobject.h
	g++ -Wall -c movingobject.cpp -o movingobject.o

robot.o: robot.cpp robot.h
	g++ -Wall -c robot.cpp -o robot.o
	
ball.o: ball.cpp ball.h
	g++ -Wall -c ball.cpp -o ball.o
	
# clean:

clean: 
	-rm *.o main test_robots test_ball test_waypoints
